#!/usr/bin/env node
const fs=require("fs"),
      fileName=process.argv[2] || __filename,
      log=console.log;


let stm=fs.createReadStream(fileName);//liu read+print

stm.on('error',(e)=>{
  log(e.message);
});//do error

if(fs.statSync(fileName).isFile()){
  log(`${fileName} is not file`);
  process.exit(2);
}

stm.pipe(process.stdout);
